<template>
	<view>
		<image class="bgview" :style="'height: '+windowHeight+'px'"
			src="https://pfmotortest.hb4oss.xstore.ctyun.cn/appstatic/img/my/bg-img.jpg"></image>
		<view class="detailInfo"
			:style="(currentStatus=='1'||currentStatus=='2'||currentStatus=='3'||(currentStatus=='5'&&data.evaluateStatus==false)||currentStatus=='-1')?'height: '+(windowHeight-80) + 'px;':'height: '+(windowHeight) + 'px;'">
			<scroll-view class="scrollView" scroll-y="true"
				:style="(currentStatus=='1'||currentStatus=='2'||currentStatus=='3'||(currentStatus=='5'&&data.evaluateStatus==false)||currentStatus=='-1')?'height: '+(windowHeight-80) + 'px;':'height: '+(windowHeight) + 'px;'">
				<!-- <scroll-view class="scrollView" scroll-y="true" :style="'height: '+(windowHeight-80) + 'px;'" > -->
				<view>
					<view class="title_layout">

						<view class="row" style="margin-top: 10px;">
							<text class="text-1" v-if="model=='maintain'">保养单号</text>
							<text class="text-1" v-if="model=='repair'">维修单号</text>
							<text class="text-2">{{data.afsOrderId}}</text>
						</view>

						<view class="row">
							<text class="text-1">姓名</text>
							<text class="text-2">{{data.userName}}</text>
						</view>
						<view class="row">
							<text class="text-1">手机号</text>
							<view @click="callMe" style="display: flex;flex-direction: row;align-items: center;">
								<image class="small-icon"
									src="https://dnsverify.pfmoto.com/appstatic/my/my_maintain_phone.png" />
								<text class="text-6" style="margin-left: 6rpx;">{{data.phone}}</text>
							</view>

						</view>
						<view class="row">
							<text class="text-1">性别</text>
							<text class="text-2">{{data.sex}}</text>
						</view>
						<view class="row">
							<text class="text-1">车辆</text>
							<text class="text-2">{{data.seriesName}} - {{data.modelName}} -{{data.configureName}}</text>
						</view>
						<view class="row">
							<text class="text-1">车架号</text>
							<text class="text-2">{{data.vin}}</text>
						</view>
						<view class="row">
							<text class="text-1">颜色</text>
							<text class="text-2">{{data.colorName}}</text>
						</view>
						<view class="row">
							<text class="text-1">里程</text>
							<text class="text-2">{{data.mileage}}KM</text>
						</view>
						<block v-if="currentStatus=='3'||currentStatus=='4'||currentStatus=='5'">
							<view class="row">
								<text class="text-1">接待人员</text>
								<text class="text-2">{{data.billingUserName}}</text>
							</view>
							<view class="row">
								<text class="text-1">开单时间</text>
								<text class="text-2">{{data.billingTime}}</text>
							</view>
							<view class="row">
								<text class="text-1">卡券编号</text>
								<text class="text-2">{{data.couponNo}}</text>
							</view>
							<view class="row">
								<text class="text-1">卡券名称</text>
								<text class="text-2">{{data.couponName}}</text>
							</view>

							<u-collapse @change="change" @close="close" @open="open" :border='false'>
								<u-collapse-item :title="item.partsName" name="Docs guide" :key="index"
									v-for="(item,index) in maintainOrderlist" class="white-drop-down-box text-3">
									<view class="collapse-line"></view>

									<view class="collapse-drop-down-row">
										<text class="text-1">编码</text>
										<text class="text-2">{{item.partsCode}}</text>
									</view>
									<view class="collapse-drop-down-row">
										<text class="text-1">单价</text>
										<text class="text-2">￥{{item.partsSalesPrice}}</text>
									</view>
									<view class="collapse-drop-down-row">
										<text class="text-1">数量</text>
										<text class="text-2">{{item.partNum}}</text>
									</view>
									<view class="collapse-drop-down-row">
										<text class="text-1">标准工时</text>
										<text class="text-2">{{item.partsBaseWorkhours}}</text>
									</view>
									<view class="collapse-drop-down-row">
										<text class="text-1">工时单价</text>
										<text class="text-2">￥{{item.partsWorkhoursUnit}}</text>
									</view>
									<view class="collapse-drop-down-row">
										<text class="text-1">配件折扣</text>
										<text class="text-2">{{item.partDiscount}}</text>
									</view>
									<view class="collapse-drop-down-row">
										<text class="text-1">工时折扣</text>
										<text class="text-2">{{item.hourDiscount}}</text>
									</view>
									<view class="collapse-line "></view>
									<view class="collapse-drop-down-row">
										<text class="text-1">故障模式</text>
										<text class="text-2">{{item.faultModeName}}</text>
									</view>
									<view class="collapse-drop-down-row">
										<text class="text-1">维修方式</text>
										<text class="text-5" v-if="item.maintainType==1">维修</text>
										<text class="text-5" v-else-if="item.maintainType==2">更换</text>
									</view>
									<view class="collapse-drop-down-row">
										<text class="text-1">是否三包</text>
										<text class="text-5" v-if="item.isWarranty==0">否</text>
										<text class="text-5" v-else-if="item.isWarranty==1">是</text>
									</view>
									<view class="collapse-line "></view>
									<view class="collapse-drop-down-row">
										<text class="text-4">配件费用总计</text>
										<text class="text-5">￥{{item.partAmountTotal}}</text>
									</view>
									<view class="collapse-drop-down-row">
										<text class="text-4">工时费用总计</text>
										<text class="text-5">￥{{item.hourAmountTotal}}</text>
									</view>
									
									
									<view slot="right-icon">
										<image style="width: 16px;height: 8.3px;transform:rotate(90deg)"
											src="@appstatic/my/my_icon_arrow_down.png" ></image>
									</view>
								</u-collapse-item>
							</u-collapse>

							<view class="row">
								<text class="text-1">工时费总计</text>
								<text class="text-2">￥{{data.hourAmountTotal}}</text>
							</view>
							<view class="row">
								<text class="text-1">配件费总计</text>
								<text class="text-2">￥{{data.partAmountTotal}}</text>
							</view>
							<view class="row"
								v-if="data.otherCostName!=undefined&&data.otherCostName!=null&&data.otherCostName!=''">
								<text class="text-1">{{data.otherCostName}}</text>
								<text class="text-2">￥{{data.otherCost}}</text>
							</view>
							<view class="row"
								v-else-if="(data.otherCostName==undefined||data.otherCostName==null||data.otherCostName=='')&&(data.otherCost!=undefined&&data.otherCost!=null&&data.otherCost!='')">
								<text class="text-1">其他费用</text>
								<text class="text-2">￥{{data.otherCost}}</text>
							</view>

							<view class="row">
								<text class="text-1">卡券减免</text>
								<text class="text-2">-￥{{data.couponAmountTotal}}</text>
							</view>
							<view class="line"></view>
							<view class="row">
								<text class="text-7">合计费用</text>
								<text class="text-8">￥{{data.totalAmount}}</text>
							</view>
						</block>
						<view class="row" v-if="currentStatus=='4'||currentStatus=='5'">
							<text class="text-1">客户确认时间</text>
							<text class="text-2">{{data.customerConfirmTime}}</text>
						</view>
						<block v-if="currentStatus=='5'">
							<view class="row">
								<text class="text-1" v-if="model=='maintain'">完成保养时间</text>
								<text class="text-1" v-if="model=='repair'">完成维修时间</text>

								<text class="text-2">{{data.stroeFinishedTime}}</text>
							</view>
							<view class="row1">
								<text class="text-1" v-if="model=='maintain'">保养单备注</text>
								<text class="text-1" v-if="model=='repair'">维修单备注</text>
								<text class="text-2" style=" min-height: 40rpx;">{{data.stroeFinishedRemark}}</text>
							</view>
						</block>



						<block v-if="currentStatus=='5'&&data.evaluateStatus==true">
							<!-- 评价1 -->
							<view class="row">
								<text class="text-1">{{evaluateInfo.category1}}</text>
								<text class="text-2">{{evaluateInfo.context1}}</text>
							</view>

							<!-- 评价2 -->
							<view class="row">
								<text class="text-1">{{evaluateInfo.category2}}</text>
								<text class="text-2">{{evaluateInfo.context2}}</text>
							</view>

							<!-- 评价3 -->
							<view class="row">
								<text class="text-1">{{evaluateInfo.category3}}</text>
								<text class="text-2">{{evaluateInfo.context3}}</text>
							</view>

							<!-- 评价4 -->
							<view class="row">
								<text class="text-1">{{evaluateInfo.category4}}</text>
								<text class="text-2">{{evaluateInfo.context4}}</text>
							</view>

							<view class="row1" style="margin-bottom: 120rpx;">
								<text class="text-1">评价详情</text>
								<text class="text-2" style=" min-height: 40rpx;">{{evaluateInfo.remark}}</text>
							</view>

						</block>

						<view class="row"
							v-if="currentStatus=='1'||currentStatus=='2'||currentStatus=='6'|| currentStatus=='-1'">
							<text class="text-1" v-if="model=='maintain'">计划保养日期</text>
							<text class="text-1" v-if="model=='repair'">计划维修日期</text>
							<text class="text-2">{{data.appointmentDate}}</text>
						</view>

						<block
							v-if="currentStatus=='2'||(currentStatus=='6'&&data.confirmEnterTime!=''&&data.confirmEnterTime!=null)|| (currentStatus=='-1'&&data.confirmEnterTime!=''&&data.confirmEnterTime!=null)">
							<view class="row">
								<text class="text-1">计划进店时间</text>
								<text class="text-2">{{data.confirmEnterTime}}</text>
							</view>
						</block>
						<view class="row1" style="align-items: flex-start;margin-top: 12px;"
							v-if="currentStatus=='1'||currentStatus=='2'||currentStatus=='6'||currentStatus=='-1'">
							<text class=" text-1">备注</text>
							<text class="text-2" style=" min-height: 40rpx;">{{data.remark}}</text>
						</view>

						<view class="row"
							v-if="currentStatus=='2'||(currentStatus=='6'&&data.stroeConfirmUserName!=''&&data.stroeConfirmUserName!=null)|| (currentStatus=='-1'&&data.stroeConfirmUserName!=''&&data.stroeConfirmUserName!=null)">
							<text class="text-1">确认人</text>
							<text class="text-2">{{data.stroeConfirmUserName}}</text>
						</view>
						<view class="row"
							v-if="currentStatus=='2'||(currentStatus=='6'&&data.stroeConfirmTime!=''&&data.stroeConfirmTime!=null)|| (currentStatus=='-1'&&data.stroeConfirmTime!=''&&data.stroeConfirmTime!=null)">
							<text class="text-1">确认时间</text>
							<text class="text-2">{{data.stroeConfirmTime}}</text>
						</view>

						<block v-if="currentStatus=='6'">
							<view class="row">
								<text class="text-1">取消时间</text>
								<text class="text-2">{{data.cancelTime}}</text>
							</view>
							<view class="row">
								<text class="text-1">取消原因</text>
								<text class="text-2">{{data.cancelReasonStr}}</text>
							</view>
						</block>
						<block v-if="currentStatus=='-1'">
							<view class="row" @click.stop="chooseCancelReason=true" style="margin-bottom: 40rpx;">
								<text class="text-1">取消原因</text>
								<view class="right">
									<text class="text-9" v-if="cancelReason==''||cancelReason==null">请选择取消原因</text>
									<text class="text-2" v-else>{{cancelReason}}</text>
									<image class="arrow"
										src="https://dnsverify.pfmoto.com/appstatic/community/activity_right_arrow.png" />
								</view>
							</view>
							<u-picker :show="chooseCancelReason" :columns="cancelReasonList" @confirm="confirmPicker"
								keyName="contentName" @cancel="chooseCancelReason=false" confirmColor="#EA5404">
							</u-picker>

						</block>


					</view>
				</view>

			</scroll-view>


		</view>

		<text class="cancelOrderBtn" v-if="currentStatus=='1'||currentStatus=='2'" @click="toCancelOrder">取消预约</text>

		<view class="cancelBtns">
			<text v-if="currentStatus=='3'" class="evaluateBtn" @click="customerConfirm">确认</text>
			<text v-else-if="currentStatus=='5'&&data.evaluateStatus==false" class="evaluateBtn"
				@click="toEvaluate">评价</text>
		</view>

		<view v-if="currentStatus=='-1'" class="cancelBtns">
			<text class="cancelBtn" @click="returnBtn">返回 </text>
			<text class="confirmBtn" @click="cancelOrderShow()">确认取消</text>
		</view>


		<!-- 	<clxDialog :isShow='showDialog' @dialogConfirm='dialogConfirm' @dialogCancel='dialogCancel' :title="dialogTitle">
		</clxDialog> -->

		<u-modal :asyncClose="true" :showCancelButton="true" confirmColor="#EA5404" cancelColor="#3D3A3A"
			cancelText="取消" @confirm="dialogConfirm" @cancel="dialogCancel" :show="showDialog" :title="dialogTitle">
		</u-modal>


	</view>
</template>

<script>
	const app = getApp();
	const util = require('@/utils/util.js');
	const network = require('@/manager/network-manager.js');
	import clxDialog from "@/components/clx-dialog/clx-dialog";
	export default {
		data() {
			return {
				windowHeight: app.globalData.windowHeight - app.globalData.navigationBarHeight,
				dialogTitle: '',
				from: '',
				showDialog: false,
				// 当前状态(1:待确认{已提交}， 2:已确认 3: 待客户确认，4:客户已确认，5:已完成 6: 已取消) 
				currentStatus: '',
				data: {},
				contentCode: '',
				cancelReason: '',
				chooseCancelReason: false,
				cancelReasonList: [],
				maintainOrderlist: [],
				evaluateInfo: {}

			}
		},
		components: {
			clxDialog
		},
		onLoad: function(options) {
			this.getDetailInfo(options.id)
			var that = this
			that.model = options.model
			if (that.model == 'maintain') {
				that.dialogTitle = '确认取消保养预约？'
			} else if (that.model == 'repair') {
				that.dialogTitle = '确认取消维修预约？'
			}


			if (options.from == 'delete') {
				that.currentStatus = '-1'
				that.from = options.from

				if (that.model == 'maintain') {
					uni.setNavigationBarTitle({
						title: '取消保养预约'
					})
				} else if (that.model == 'repair') {
					uni.setNavigationBarTitle({
						title: '取消维修预约'
					})
				}


			} else {

				if (that.model == 'maintain') {
					uni.setNavigationBarTitle({
						title: '保养预约详情'
					})
				} else if (that.model == 'repair') {
					uni.setNavigationBarTitle({
						title: '维修预约详情'
					})
				}
			}
			// that.getDictionaryDetailedList()
			if (options.from == "message" || options.from == "notice") {
				this.update2Read(options.myId,options.from);
			}



		},
		methods: {
			//更新已读
			update2Read: function(myId,from) {
				debugger
				var that = this;
				var uri = app.globalData.config.interfaces
					.URL_SYS_SENDMSG_UPDATE_LEVCMSGUSERREADY; ///levc-sys/sendMessage/updateLevcMessageUserReady
				var params = {
					"id": myId,
					"isType": 2
				};
				network.post(uri, params, 'json').then(res => {
					debugger
					if (res.code == 200) {
						console.log("已读", JSON.stringify(res));
						if(from=='message'){
							//回调上一个页面
							let pages = getCurrentPages();
							if (pages.length == 3) {
								let prePage = pages[pages.length - 2];
								let preprePage = pages[pages.length - 3]
								// #ifdef H5
								prePage.refresh(myId);
								preprePage.refresh();
								// #endif
								// #ifdef APP-PLUS
								prePage.$vm.refresh(myId);
								preprePage.$vm.refresh();
								// #endif
							}
						}else{
							let pages = getCurrentPages();
							let prePage = pages[pages.length - 2];
							// #ifdef H5
							prePage.refresh(myId);
							// #endif
							// #ifdef APP-PLUS
							prePage.$vm.refresh(myId);
							// #endif
						}
						
						util.syncBadge(getApp())
					} else {
						uni.showToast({
							title: res.message,
							duration: 3000,
							icon: 'none'
						})
					}

				}).catch(res => {
					uni.showToast({
						title: res.errMsg,
						duration: 3000,
						icon: 'none'
					})
					console.error(res);
				});
			},





			//获取取消原因
			getDictionaryDetailedList: function() {
				var that = this;
				var uri = app.globalData.config.interfaces.URL_DICTIONARY_GETDICTIONARYLIST; //字典
				var params = {
					dictionaryCode: 'PF_CANCEL_REASOON_TYPE'
				};
				network.get(uri, params, 'form').then(res => {
					if (res.code == 200) {
						that.cancelReasonList = [res.data]
					} else {
						uni.showToast({
							title: res.message,
							duration: 3000,
							icon: 'none'
						})
					}
				}).catch(res => {
					uni.showToast({
						title: res.errMsg,
						duration: 3000,
						icon: 'none'
					})
				});
			},
			//确定-选择下拉框
			confirmPicker: function(e) {
				if (this.chooseCancelReason == true) {
					this.chooseCancelReason = false
					this.cancelReason = e.value[0].contentName
					this.contentCode = e.value[0].contentCode
				}

			},
			//返回取消预约
			returnBtn: function() {
				var that = this
				if (that.from == 'delete') {
					uni.navigateBack({
						delta: 1
					})
				} else {
					// that.currentStatus = '1'
					that.getDetailInfo(that.data.id)
					if (that.model == 'maintain') {
						uni.setNavigationBarTitle({
							title: '保养预约详情'
						})
					} else if (that.model == 'repair') {
						uni.setNavigationBarTitle({
							title: '维修预约详情'
						})
					}
				}
			},
			//跳到取消预约画面
			toCancelOrder: function() {
				debugger
				var that = this
				that.currentStatus = '-1'
				that.getDictionaryDetailedList()
				if (that.model == 'maintain') {
					uni.setNavigationBarTitle({
						title: '取消保养预约'
					})
				} else if (that.model == 'repair') {
					uni.setNavigationBarTitle({
						title: '取消维修预约'
					})
				}

			},
			//查询维修保养订单详情
			getDetailInfo: function(id) {
				var that = this;
				that.dataList = []
				var uri = app.globalData.config.interfaces.URL_PRODUCT_AFTERSALES_GETDETAILINFO; //刷新页面配置
				var params = {
					"id": id
				};
				network.get(uri, params, 'form').then(res => {
					if (res.code == 200) {
						that.data = res.data;
						that.currentStatus = that.data.currentStatus
						if (that.from == 'delete') {
							that.currentStatus = '-1'
							that.getDictionaryDetailedList()
						}
						if (that.currentStatus == '3' || that.currentStatus == '4' || that.currentStatus ==
							'5') {
							that.getPartList(that.data.id)
						}
						if (that.currentStatus == '5' && that.data.evaluateStatus == true) {
							that.getEvaluateInfo(that.data.id)
						}
						// 当前状态(1:待确认{已提交}， 2:已确认 3: 待客户确认，4:客户已确认，5:已完成 6: 已取消) 

					} else {
						uni.showToast({
							title: res.message,
							duration: 3000,
							icon: 'none'
						})
					}
				}).catch(res => {
					uni.showToast({
						title: res.errMsg,
						duration: 3000,
						icon: 'none'
					})


				});
			},
			//查询维修保养配件列表
			getPartList: function(id) {
				var that = this;
				var uri = app.globalData.config.interfaces.URL_PRODUCT_AFTERSALES_GETPARTLIST;
				var params = {
					"id": id
				};
				network.get(uri, params, 'form').then(res => {
					if (res.code == 200) {
						that.maintainOrderlist = res.data
					} else {
						uni.showToast({
							title: res.message,
							duration: 3000,
							icon: 'none'
						})
					}
				}).catch(res => {
					uni.showToast({
						title: res.errMsg,
						duration: 3000,
						icon: 'none'
					})
				});
			},
			//查询评价详情
			getEvaluateInfo: function(id) {
				var that = this;
				var uri = app.globalData.config.interfaces.URL_PRODUCT_AFTERSALES_GETEVALUATE;
				var params = {
					"orderId": id
				};
				network.get(uri, params, 'form').then(res => {
					if (res.code == 200) {
						that.evaluateInfo = res.data
					} else {
						uni.showToast({
							title: res.message,
							duration: 3000,
							icon: 'none'
						})
					}
				}).catch(res => {
					uni.showToast({
						title: res.errMsg,
						duration: 3000,
						icon: 'none'
					})
				});
			},

			//维修保养客户确认
			customerConfirm: function() {
				var that = this;
				var uri = app.globalData.config.interfaces.URL_PRODUCT_AFTERSALES_CUSTOMERCONFIRM;
				var params = {
					"id": that.data.id
				};
				network.post(uri, params, 'form', null, true).then(res => {
					if (res.code == 200) {
						that.getDetailInfo(that.data.id)
					} else {
						uni.showToast({
							title: res.message,
							duration: 3000,
							icon: 'none'
						})
					}
				}).catch(res => {
					uni.showToast({
						title: res.errMsg,
						duration: 3000,
						icon: 'none'
					})
				});
			},

			//取消预约
			cancelOrderShow: function() {

				var that = this
				// that.returnBtn()
				that.showDialog = true

			},
			//确定
			dialogConfirm(e) {
				var that = this
				that.showDialog = false
				this.cancelOrderById()

			},
			//取消
			dialogCancel() {
				this.showDialog = false
			},
			//通过id取消订单
			cancelOrderById() {
				var that = this;
				if (that.cancelReason == '') {
					uni.showToast({
						title: "请输入取消原因",
						duration: 3000,
						icon: 'none',
					})
					return
				}
				var uri = app.globalData.config.interfaces.URL_PRODUCT_AFTERSALES_CANCELAFTERSALES;
				var params = {
					"id": that.data.id,
					"loginId": app.getUserId(),
					"cancelReason": that.contentCode
				};
				network.post(uri, params, 'form').then(res => {
					uni.stopPullDownRefresh();
					if (res.code == 200) {
						if (that.model == 'maintain') {
							if (that.from == 'delete') {
								uni.showToast({
									title: "取消保养预约成功",
									duration: 3000,
									icon: 'none',
									success: () => {
										setTimeout(() => {
											uni.navigateBack({
												delta: 1
											});
										}, 2000)
									}
								})

							} else {
								uni.showToast({
									title: "取消保养预约成功",
									duration: 3000,
									icon: 'none',
									success: () => {
										setTimeout(() => {
											that.getDetailInfo(that.data.id)
											uni.setNavigationBarTitle({
												title: '保养预约详情'
											})
										}, 500)
									}
								})
							}
						} else if (that.model == 'repair') {
							if (that.from == 'delete') {
								uni.showToast({
									title: "取消维修预约成功",
									duration: 3000,
									icon: 'none',
									success: () => {
										setTimeout(() => {
											uni.navigateBack({
												delta: 1
											});
										}, 2000)
									}
								})
							} else {
								uni.showToast({
									title: "取消维修预约成功",
									duration: 3000,
									icon: 'none',
									success: () => {
										setTimeout(() => {
											that.getDetailInfo(that.data.id)
											uni.setNavigationBarTitle({
												title: '维修预约详情'
											})
										}, 500)
									}
								})
							}
						}
					} else {
						uni.showToast({
							title: res.message,
							duration: 3000,
							icon: 'none'
						})
					}
				}).catch(res => {
					console.error(res, 'err')
					uni.showToast({
						title: res.errMsg,
						duration: 3000,
						icon: 'none'
					})
					console.error(res);

				});
			},

			//我的评价
			toEvaluate() {
				// uni.navigateTo({
				// 	url: "../myMaintainEvaluate/myMaintainEvaluate"
				// });
				var url = ''
				if (this.model == 'maintain') {
					url =
						`/module_my/pages/orderDetail/orderEvaluate?id=${this.data.id}&listType=2&orderType=maintain&type=create`

				} else if (this.model == 'repair') {
					url =
						`/module_my/pages/orderDetail/orderEvaluate?id=${this.data.id}&listType=3&orderType=repair&type=create`
				}

				uni.navigateTo({
					url: url
				});
			},

			//评价成功刷新列表
			orderEvaluateSuccess: function(id) {
				var that = this
				that.getDetailInfo(id)
			},

			//打电话
			callMe: function() {
				var that = this
				let platform = uni.getSystemInfoSync().platform; // 获取客户端信息，platform为ios/android
				//#ifdef APP
				if (plus.os.name == "iOS") {
					// 打电话
					uni.makePhoneCall({
						phoneNumber: that.data.phone //仅为示例
					});
				} else {
					const callPhone = requestAndroidPermission('android.permission.CALL_PHONE')
					console.log('callPhone' + callPhone)

					if (callPhone) {
						// 打电话
						uni.makePhoneCall({
							phoneNumber: that.data.phone //仅为示例
						});
					} else {
						console.log('false')
						uni.showModal({
							title: '提示',
							content: "请允许APP使用拨打电话和管理电话权限",
							success: function(res) {
								if (res.confirm) {
									gotoAppPermissionSetting()
								}
							}
						});
					}
				}
				//#endif
				//#ifdef MP-WEIXIN
				uni.makePhoneCall({
					// 手机号 这里可以直接写号码如 12345 也可以写获取号码的字段如this.mobile
					phoneNumber: that.data.phone,
					// 成功回调
					success: (res) => {
						console.log('调用成功!')
					},
					// 失败回调
					fail: (res) => {
						console.log('调用失败!')
					}
				});
				//#endif

			},

		}
	}
</script>

<style>
	@import "./myMaintainDetail.css";
</style>
